package com.bmslz.monitor.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 项目告警
 * @Author: bobo
 * @Date:   2025-08-10
 * @Version: V1.0
 */
@Data
@TableName("m_project_alarm")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="m_project_alarm对象", description="项目告警")
public class ProjectAlarm {
    
	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
	private String id;
	/**用户id*/
	@ApiModelProperty(value = "用户id")
	private String userId;
	/**项目编号*/
    @ApiModelProperty(value = "项目编号")
	private String projectNo;
	/**项目ID*/
	@ApiModelProperty(value = "项目ID")
	private String projectId;
	/**项目名称*/
    @ApiModelProperty(value = "项目名称")
	private String projectName;
	/**1 紧急 2 告警 3 预警*/
	@ApiModelProperty(value = "1 紧急 2 告警 3 预警")
	private String grade;
	/**状态 0解除告警 1告警中*/
    @ApiModelProperty(value = "状态 0解除告警 1告警中")
	private String status;
	/**告警规则id*/
    @ApiModelProperty(value = "告警规则id")
	private String alarmRuleId;
	/**告警规则编号*/
    @ApiModelProperty(value = "告警规则编号")
	private String alarmRuleNo;
	/**测点key*/
    @ApiModelProperty(value = "测点key")
	private String attKey;
	/**测点名称*/
	@ApiModelProperty(value = "测点名称")
	private String attName;
	/**告警值*/
    @ApiModelProperty(value = "告警值")
	private String alarmValue;
	/**告警规则阈值*/
    @ApiModelProperty(value = "告警规则阈值")
	private String ruleValue;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
	private Date updateTime;
	/**删除状态（0，正常，1已删除）*/
    @ApiModelProperty(value = "删除状态（0，正常，1已删除）")
	@TableLogic
	private String delFlag;
}
